package day06;
import java.util.Arrays;
public class ArayDemo {
    public static void main(String[] args) {
        int[] a = {10,20,30,40,50};
        a = Arrays.copyOf(a,6);
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }










        /*int[] a = {10,20,30,40,50,};
        int[] b = new int[6];
        //a:原数组
        //1:原数组的起始下标
        //b:目标数组
        //0：目标数组的起始下标
        //4：要复制的元素个数
        System.arraycopy(a,1,b,0,4);
        for (int i=0;i<b.length;i++){
            System.out.println(b[i]);
        }*/
    }

}
